java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Cannot find current proxy: Set exposeProxy property on Advised to 'true' to make it available, and ensure that AopContext.currentProxy() is invoked in the same thread as the AOP invocation context.
publicfinalclassAopContext{ privatestaticfinal ThreadLocal<Object> currentProxy = new NamedThreadLocal<>("Current AOP proxy");
privateAopContext(){ } publicstatic Object currentProxy()throws IllegalStateException { Object proxy = currentProxy.get(); if (proxy == null) { thrownew IllegalStateException( "Cannot find current proxy: Set 'exposeProxy' property on Advised to 'true' to make it available, and " + "ensure that AopContext.currentProxy() is invoked in the same thread as the AOP invocation context."); } return proxy; } }